Leadtools.Dicom.AddIn Requires Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
Add(TKey,TValue) Method
See Also 
Leadtools.Dicom.AddIn Namespace > Generic ThreadSafeDictionary Class > Add Method : Add(TKey,TValue) Method



key
The object to use as the key of the element to add.
value
The object to use as the value of the element to add.
key
The object to use as the key of the element to add.
value
The object to use as the value of the element to add.
Adds an element with the provided key and value to the Generic IDictionary.

Syntax

Visual Basic (Declaration) 
Overloads Public Overridable Sub Add( _
   ByVal key As TKey, _
   ByVal value As TValue _
) 
Visual Basic (Usage)Copy Code
Dim instance As ThreadSafeDictionary(Of TKey,TValue)
Dim key As TKey
Dim value As TValue
 
instance.Add(key, value)
C# 
public virtual void Add( 
   TKey key,
   TValue value
)
C++/CLI 
public:
virtual void Add( 
   TKey key,
   TValue value
) 

Parameters

key
The object to use as the key of the element to add.
value
The object to use as the value of the element to add.

Exceptions

ExceptionDescription
ArgumentNullExceptionkey is null.
ArgumentException An element with the same key already exists in the Generic IDictionary.
NotSupportedException The Generic IDictionary is read-only.

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also

Leadtools.Dicom.AddIn requires a Medical toolkit server license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features